<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 个人笔记 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>类型与语法 | 个人笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/javascript/定时器.html" />
    
    
    <link rel="prev" href="../../md/javascript/javascript.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="3.1"
        data-chapter-title="类型与语法"
        data-filepath="md/javascript/类型.md"
        data-basepath="../.."
        data-revision="Thu Feb 14 2019 20:54:34 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        开始界面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/jianjie.html">
            
                
                    <a href="../../md/html/jianjie.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        html
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/20170719.html">
            
                
                    <a href="../../md/html/20170719.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        head
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/html/2017720.html">
            
                
                    <a href="../../md/html/2017720.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        常用标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/html/sy.html">
            
                
                    <a href="../../md/html/sy.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        音频与视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="md/html/ckw.html">
            
                
                    <a href="../../md/html/ckw.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        实体字符与锚点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="md/html/table.html">
            
                
                    <a href="../../md/html/table.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        table表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="md/html/input.html">
            
                
                    <a href="../../md/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        input标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="md/html/form.html">
            
                
                    <a href="../../md/html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="md/html/buju.html">
            
                
                    <a href="../../md/html/buju.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        网页布局
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css.html">
            
                
                    <a href="../../md/css/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/20170724.html">
            
                
                    <a href="../../md/css/20170724.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        选择器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="md/css/通配选择器.html">
            
                
                    <a href="../../md/css/通配选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        通配选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="md/css/元素选择器.html">
            
                
                    <a href="../../md/css/元素选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="md/css/群组选择器.html">
            
                
                    <a href="../../md/css/群组选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        群组选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="md/css/关系选择器.html">
            
                
                    <a href="../../md/css/关系选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="md/css/id和class选择器.html">
            
                
                    <a href="../../md/css/id和class选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        id和class选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="md/css/weilei.html">
            
                
                    <a href="../../md/css/weilei.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="md/css/属性选择器.html">
            
                
                    <a href="../../md/css/属性选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="md/css/伪对象选择器.html">
            
                
                    <a href="../../md/css/伪对象选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.8.</b>
                        
                        伪对象选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/字体.html">
            
                
                    <a href="../../md/css/字体.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        字体库的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/css/边框.html">
            
                
                    <a href="../../md/css/边框.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        border边框和background背景
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/css/浮动.html">
            
                
                    <a href="../../md/css/浮动.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/css/块级和行内.html">
            
                
                    <a href="../../md/css/块级和行内.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        块级和行内元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="md/css/盒子.html">
            
                
                    <a href="../../md/css/盒子.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        盒子模型和三角形
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/css/聊天气泡.html">
            
                
                    <a href="../../md/css/聊天气泡.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        聊天气泡
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/css/段落控制.html">
            
                
                    <a href="../../md/css/段落控制.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文字溢出处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="md/css/固定定位.html">
            
                
                    <a href="../../md/css/固定定位.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="md/css/sacss.html">
            
                
                    <a href="../../md/css/sacss.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        sacss和码云git的使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="md/css/sacss的安装.html">
            
                
                    <a href="../../md/css/sacss的安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        sacss的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="md/css/sacss使用.html">
            
                
                    <a href="../../md/css/sacss使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.2.</b>
                        
                        sacss的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="md/css/码云.html">
            
                
                    <a href="../../md/css/码云.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.3.</b>
                        
                        码云
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="md/css/变换和过渡.html">
            
                
                    <a href="../../md/css/变换和过渡.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        transform变换和transition过渡
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="md/css/swiper的使用.html">
            
                
                    <a href="../../md/css/swiper的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        swiper的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="md/css/viewport视口.html">
            
                
                    <a href="../../md/css/viewport视口.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.13.</b>
                        
                        viewport视口
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.14" data-path="md/css/列式布局.html">
            
                
                    <a href="../../md/css/列式布局.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.</b>
                        
                        列式布局
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.15" data-path="md/css/媒体查询.html">
            
                
                    <a href="../../md/css/媒体查询.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.</b>
                        
                        媒体查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.16" data-path="md/css/flex弹性盒子.html">
            
                
                    <a href="../../md/css/flex弹性盒子.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.16.</b>
                        
                        flex弹性盒子
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/javascript/javascript.html">
            
                
                    <a href="../../md/javascript/javascript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        javascript
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="3.1" data-path="md/javascript/类型.html">
            
                
                    <a href="../../md/javascript/类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        类型与语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/javascript/定时器.html">
            
                
                    <a href="../../md/javascript/定时器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        定时器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="md/javascript/Date.html">
            
                
                    <a href="../../md/javascript/Date.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Date时间、日期
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="md/javascript/document的使用.html">
            
                
                    <a href="../../md/javascript/document的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        DOM的增、删、改、查
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="md/javascript/数组.html">
            
                
                    <a href="../../md/javascript/数组.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="md/javascript/for循环.html">
            
                
                    <a href="../../md/javascript/for循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        for循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="md/javascript/Math对象.html">
            
                
                    <a href="../../md/javascript/Math对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        Math对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="md/javascript/事件.html">
            
                
                    <a href="../../md/javascript/事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        事件
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.8.1" data-path="md/javascript/事件监听器.html">
            
                
                    <a href="../../md/javascript/事件监听器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.1.</b>
                        
                        事件监听器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8.2" data-path="md/javascript/滚动条事件.html">
            
                
                    <a href="../../md/javascript/滚动条事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.2.</b>
                        
                        滚动条事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8.3" data-path="md/javascript/事件代理.html">
            
                
                    <a href="../../md/javascript/事件代理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.3.</b>
                        
                        事件代理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8.4" data-path="md/javascript/事件派发.html">
            
                
                    <a href="../../md/javascript/事件派发.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.4.</b>
                        
                        事件派发
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8.5" data-path="md/javascript/鼠标跟随事件.html">
            
                
                    <a href="../../md/javascript/鼠标跟随事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.5.</b>
                        
                        鼠标跟随事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8.6" data-path="md/javascript/鼠标事件.html">
            
                
                    <a href="../../md/javascript/鼠标事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.6.</b>
                        
                        鼠标、键盘事件
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="md/javascript/对象.html">
            
                
                    <a href="../../md/javascript/对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="md/javascript/轮播图.html">
            
                
                    <a href="../../md/javascript/轮播图.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        轮播图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="md/javascript/高德地图的使用.html">
            
                
                    <a href="../../md/javascript/高德地图的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        高德地图的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="md/javascript/预加载.html">
            
                
                    <a href="../../md/javascript/预加载.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        预加载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="md/javascript/vue框架.html">
            
                
                    <a href="../../md/javascript/vue框架.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        vue框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="md/javascript/http缓存.html">
            
                
                    <a href="../../md/javascript/http缓存.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        http缓存
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.15" data-path="md/javascript/闭包.html">
            
                
                    <a href="../../md/javascript/闭包.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.15.</b>
                        
                        闭包
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.16" data-path="md/javascript/Ajax.html">
            
                
                    <a href="../../md/javascript/Ajax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.16.</b>
                        
                        Ajax
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.17" data-path="md/javascript/Ajax数据请求.html">
            
                
                    <a href="../../md/javascript/Ajax数据请求.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.17.</b>
                        
                        Ajax数据请求
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.18" data-path="md/javascript/打包工具.html">
            
                
                    <a href="../../md/javascript/打包工具.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.18.</b>
                        
                        打包工具
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.19" data-path="md/javascript/前端框架汇总.html">
            
                
                    <a href="../../md/javascript/前端框架汇总.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.19.</b>
                        
                        前端框架汇总
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/jquery/jquery.html">
            
                
                    <a href="../../md/jquery/jquery.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        jquery
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/book/book.html">
            
                
                    <a href="../../md/book/book.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        弹性盒子
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="md/tool/前端工具.html">
            
                
                    <a href="../../md/tool/前端工具.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        前端工具
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="md/tool/git的安装.html">
            
                
                    <a href="../../md/tool/git的安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        git的安装
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="md/opus/item.html">
            
                
                    <a href="../../md/opus/item.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        项目
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >个人笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x5F31;&#x7C7B;&#x578B;&#x4E0E;&#x5F3A;&#x7C7B;&#x578B;&#x7684;&#x5BF9;&#x6BD4;">&#x5F31;&#x7C7B;&#x578B;&#x4E0E;&#x5F3A;&#x7C7B;&#x578B;&#x7684;&#x5BF9;&#x6BD4;</h2>
<p>&#x5F3A;&#x7C7B;&#x578B;(java)&#xFF1A;&#x5BF9;&#x5F00;&#x53D1;&#x8005;&#x8981;&#x6C42;&#x6BD4;&#x8F83;&#x9AD8;&#xFF0C;&#x4FDD;&#x8BC1;&#x4EE3;&#x7801;&#x7684;&#x4E25;&#x8C28;&#x6027;<br>
&#x5F31;&#x7C7B;&#x578B;(javascript)&#xFF1A;&#x867D;&#x7136;&#x5BF9;&#x4E8E;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x6BD4;&#x8F83;&#x81EA;&#x7531;&#xFF0C;&#x4F46;&#x5728;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x7684;&#x4F7F;&#x7528;&#x4E0A;&#x5BB9;&#x6613;&#x51FA;&#x73B0;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x7684;&#x95EE;&#x9898;</p>
<h2 id="&#x5982;&#x4F55;&#x5728;&#x9875;&#x9762;&#x91CC;&#x5F15;&#x5165;js">&#x5982;&#x4F55;&#x5728;&#x9875;&#x9762;&#x91CC;&#x5F15;&#x5165;js</h2>
<p>1.&#x9875;&#x5916;</p>
<pre><code>&lt;script src=&quot;js/test.js&quot; async=&quot;async&quot; defer=&quot;defer&quot;&gt;&lt;/script&gt;
</code></pre><p>&#x5982;&#x679C;&#x60F3;&#x5F02;&#x6B65;&#x52A0;&#x8F7D;&#xFF0C;&#x53EF;&#x4EE5;&#x589E;&#x52A0;<code>async</code>&#x5C5E;&#x6027;&#xFF0C;&#x907F;&#x514D;&#x9875;&#x9762;&#x52A0;&#x8F7D;&#x8FC7;&#x7A0B;&#x4E2D;&#x51FA;&#x73B0;&#x963B;&#x585E;<code>defer=&quot;defer&quot;</code>&#x8BA9;js&#x5177;&#x6709;&#x540C;&#x6B65;&#x6B65;&#x7684;&#x5C5E;&#x6027;</p>
<blockquote>
<p>&#x5F53;&#x7136;&#xFF0C;&#x505A;&#x597D;&#x53EF;&#x4EE5;&#x628A;js&#x6587;&#x4EF6;&#x7EDF;&#x4E00;&#x653E;&#x7F6E;&#x5728;body&#x7684;&#x7ED3;&#x675F;&#x4F4D;&#x7F6E;&#xFF0C;&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x4FDD;&#x8BC1;&#x9875;&#x9762;&#x5B8C;&#x5168;&#x52A0;&#x8F7D;&#x540E;&#xFF0C;&#x624D;&#x8FD0;&#x884C;&#x811A;&#x672C;
2.&#x9875;&#x5185;</p>
<pre><code>&lt;script&gt;
alert(&quot;ckw&quot;);
&lt;/script&gt;
</code></pre><p>3.&#x884C;&#x5185;</p>
<pre><code>&lt;button onclick=&quot;javascript:alert(&apos;&#x4F60;&#x70B9;&#x5230;&#x6211;&#x4E86;&apos;)&quot;&gt;&#x70B9;&#x6211;&lt;/button&gt;
</code></pre></blockquote>
<h2 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h2>
<blockquote>
<p>&#x53D8;&#x91CF;&#x7684;&#x547D;&#x540D;&#x89C4;&#x5219;</p>
<ul>
<li>1.&#x9996;&#x5B57;&#x7B26;&#x5FC5;&#x987B;&#x662F;&#x5B57;&#x6BCD;&#x3001;&#x4E0B;&#x5212;&#x7EBF;&#x6216;$&#x7F8E;&#x5143;&#x7B26;&#x53F7;</li>
<li>2.&#x9664;&#x4E86;&#x9996;&#x5B57;&#x7B26;&#x4EE5;&#x5916;&#x7684;&#x5B57;&#x7B26;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x5B57;&#x6BCD;&#x3001;&#x4E0B;&#x5212;&#x7EBF;&#x3001;$&#x3001;&#x6570;&#x5B57;</li>
<li>3.&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x5173;&#x952E;&#x5B57;&#x548C;&#x4FDD;&#x7559;&#x5B57;</li>
<li>4.&#x8D77;&#x7684;&#x53D8;&#x91CF;&#x540D;&#x79F0;&#x8981;&#x6709;&#x8BED;&#x4E49;&#xFF0C;&#x4E0D;&#x80FD;&#x4E71;&#x8D77;&#x540D;&#x5B57;&#xFF0C;&#x4F8B;&#x5982;&#x7528;&#x6C34;&#x679C;&#x547D;&#x540D;</li>
<li>5.&#x533A;&#x5206;&#x5927;&#x5C0F;&#x5199;</li>
<li>&#x5982;&#x679C;&#x8FDD;&#x53CD;1&#xFF0C;2&#xFF0C;3&#x70B9;&#xFF0C;&#x4F1A;&#x89E6;&#x53D1;SyntaxError</li>
<li><code>var</code>&#x53EF;&#x4EE5;&#x5B9A;&#x4E49;&#x53D8;&#x91CF;&#x5BB9;&#x5668;&#xFF0C;&#x540C;&#x65F6;&#x5177;&#x6709;&#x2018;&#x63D0;&#x5347;&#x2019;&#x7684;&#x4F5C;&#x7528;&#xFF0C;&#x5C31;&#x662F;&#x628A;&#x53D8;&#x91CF;&#x7684;&#x5B9A;&#x4E49;&#x5168;&#x90E8;&#x7EDF;&#x4E00;&#x63D0;&#x524D;&#x5230;&#x7A0B;&#x5E8F;&#x7684;&#x6700;&#x5F00;&#x59CB;</li>
</ul>
</blockquote>
<p>&#x5C0F;&#x9A7C;&#x5CF0;&#x547D;&#x540D;
<code>var shhopName;</code>
&#x9A7C;&#x5CF0;&#x547D;&#x540D;
<code>var ShopList = Infinity;</code></p>
<h2 id="&#x6570;&#x636E;&#x7C7B;&#x578B;">&#x6570;&#x636E;&#x7C7B;&#x578B;</h2>
<h4 id="&#x57FA;&#x672C;&#x7C7B;&#x578B;">&#x57FA;&#x672C;&#x7C7B;&#x578B;</h4>
<p>1.&#x5B57;&#x7B26;&#x4E32;  &#x5B83;&#x7684;&#x503C;&#x6C38;&#x8FDC;&#x90FD;&#x4F1A;&#x6709;&#x5F15;&#x53F7;(&#x5355;&#x5F15;&#x6216;&#x53CC;&#x5F15;&#x53F7;&#x3001;es6&#x65B0;&#x52A0;&#x8FD4;&#x5355;&#x5F15;&#x53F7;)&#x5305;&#x8D77;&#x6765;<br>
<code>var name = &quot;bgg&quot;,tecc = &apos;php&#x3001;&#x524D;&#x7AEF;&#x3001;&#x670D;&#x52A1;&#x5668;&#x7B49;&apos;;
var i_say = &quot;My name is &quot;+name+&quot;,&#x6211;&#x53EB;&#x67D0;&#x67D0;&#x67D0;&quot;;</code></p>
<p>&#x53CD;&#x5355;&#x5F15;&#x53F7;&#xFF0C;&#x4E13;&#x95E8;&#x7528;&#x6765;&#x663E;&#x793A;&#x591A;&#x884C;&#x6587;&#x672C;&#xFF0C;&#x4F1A;&#x628A;&#x6574;&#x4E2A;&#x6587;&#x672C;&#x7684;&#x6240;&#x6709;&#x683C;&#x5F0F;&#x5B8C;&#x6574;&#x4FDD;&#x7559;&#x4E0B;&#x6765;&#xFF0C;&#x5982;&#x679C;&#x8981;&#x663E;&#x793A;&#x8FD9;&#x4E9B;&#x7279;&#x6B8A;&#x7684;&#x7B26;&#x53F7;&#xFF0C;&#x9700;&#x8981;&#x7528;&#x4E0A;&#x53CD;&#x659C;&#x6760;(&#x8868;&#x793A;&#x8F6C;&#x4E49;)</p>
<pre><code>var content=`
            &#x6211;&#x53EB;${name},
            &#x54C8;&#x54C8;\$\{\},
            &#x4ECA;&#x5929;&#x597D;&#x5927;&#x96E8;,
            &#x53EF;&#x662F;&#x6211;&#x8FD8;&#x662F;&#x575A;&#x6301;&#x56DE;&#x6765;&#x4E86;
        `;
</code></pre><p>2.&#x6570;&#x503C;(Number)</p>
<p>infinity &#x65E0;&#x9650;&#x5927;
NaN   Not a Number   &#x4E0D;&#x662F;&#x4E00;&#x4E2A;&#x6570;
NaN&#x4E0E;NaN&#x6BD4;&#x8F83;&#xFF0C;&#x7ED3;&#x679C;&#x662F;false
&#x9690;&#x6027;&#x8F6C;&#x6362;</p>
<p>3.&#x5E03;&#x5C14;&#x503C;(Boolean)</p>
<p>&#x53EA;&#x6709;&#x4E24;&#x4E2A;&#x503C;true&#x548C;false</p>
<p>4.&#x7A7A;/&#x65E0;(undefined/null)</p>
<p>null&#x548C;undefined:null&#x662F;&#x4EC0;&#x4E48;&#x90FD;&#x6CA1;&#x6709;&#xFF0C;&#x8FDE;&#x4E2A;&#x76D2;&#x5B50;&#x90FD;&#x6CA1;&#x6709;&#x3002;undefined&#x6709;&#x4E2A;&#x76D2;&#x5B50;&#xFF0C;&#x4F46;&#x4E0D;&#x77E5;&#x9053;&#x8981;&#x88C5;&#x4EC0;&#x4E48;&#x4E1C;&#x897F;</p>
<h4 id="&#x5F15;&#x7528;&#x7C7B;&#x578B;">&#x5F15;&#x7528;&#x7C7B;&#x578B;</h4>
<p>5.&#x5BF9;&#x8C61;&#x7C7B;&#x578B;(Object)</p>
<p>&#x5C5E;&#x6027;&#x952E;&#x503C;&#x7684;&#x96C6;&#x5408;&#xFF0C;&#x8868;&#x793A;&#x5BF9;&#x8C61;&#x5177;&#x6709;&#x4EC0;&#x4E48;&#x6837;&#x7684;&#x5C5E;&#x6027;
&#x65B9;&#x6CD5;1&#xFF1A;&#x5148;&#x751F;&#x6210;&#x7A7A;&#x7684;&#x5BF9;&#x8C61;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x7ED9;&#x5177;&#x4F53;&#x7684;&#x5C5E;&#x6027;&#x8D4B;&#x503C;
&#x65B9;&#x6CD5;2&#xFF1A;&#x751F;&#x6210;&#x5BF9;&#x8C61;&#x7684;&#x540C;&#x65F6;&#xFF0C;&#x628A;&#x5C5E;&#x6027;&#x540D;&#x548C;&#x5C5E;&#x6027;&#x503C;&#x4E00;&#x8D77;&#x5B9A;&#x4E49;&#x8FDB;&#x53BB;</p>
<p>6.&#x6570;&#x7EC4;&#x7C7B;&#x578B;(Array)</p>
<pre><code>var arr = [1,2,3];
console.log(arr[2]);
</code></pre><p>7.&#x51FD;&#x6570;&#x7C7B;&#x578B;(Function)</p>
<p><strong>&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x548C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x7684;&#x533A;&#x522B;&#xFF1A;</strong><br>
1.&#x7ED3;&#x6784;&#x6BD4;&#x8F83;&#x590D;&#x6742;<br>
2.&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x5728;&#x8D4B;&#x503C;&#x7684;&#x65F6;&#x5019;&#x62F7;&#x8D1D;&#x503C;&#xFF0C;&#x590D;&#x6742;&#x7C7B;&#x578B;&#x5728;&#x8D4B;&#x503C;&#x7684;&#x65F6;&#x5019;&#x53EA;&#x62F7;&#x8D1D;&#x5730;&#x5740;&#xFF0C;&#x4E0D;&#x62F7;&#x8D1D;&#x503C;&#x3002;<br>
3.&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x53D8;&#x91CF;&#x5B58;&#x7684;&#x662F;&#x503C;&#xFF0C;&#x590D;&#x6742;&#x7C7B;&#x578B;&#x7684;&#x53D8;&#x91CF;&#x5B58;&#x7684;&#x662F;&#x5185;&#x5B58;&#x5730;&#x5740;&#x3002;<br>
4.&#x4F20;&#x9012;&#x503C;&#x7684;&#x65F6;&#x5019;&#xFF1A;&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x4F20;&#x503C;&#x3001;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x4F20;&#x5730;&#x5740;<br>
5.&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x7684;&#x6570;&#x636E;&#x91CF;&#x6BD4;&#x8F83;&#x5927;&#xFF0C;&#x4E3A;&#x4E86;&#x8282;&#x7701;&#x7A7A;&#x95F4;&#xFF0C;&#x5728;&#x8D4B;&#x503C;&#x548C;&#x590D;&#x5236;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x76F4;&#x63A5;&#x53BB;&#x5F15;&#x7528;&#x5730;&#x5740;<br></p>
<pre><code>var fun = function(name,age){
    console.log(&quot;&#x4E00;&#x4E2A;&#x82B3;&#x9F84;&quot;+age+&quot;&#x7684;&quot;+name+&quot;&#x5DF2;&#x7ECF;&#x8D70;&#x8FDB;&#x4E86;fun1&quot;);
}
function fun1(name,age){
    var name = a;
    console.log(name+&quot;&#x5DF2;&#x7ECF;&#x8D70;&#x8FDB;&#x4E86;fun1&quot;);
}
//&#x9700;&#x8981;&#x65F6;&#x624D;&#x53BB;&#x8FD0;&#x884C;   &#x51FD;&#x6570;&#x540D; &#xFF08;&#x53C2;&#x6570;&#xFF09;
//&#x597D;&#x5904;&#xFF1A;&#x4EE3;&#x7801;&#x5757;&#x53EF;&#x4EE5;&#x53CD;&#x590D;&#xFF0C;&#x4E13;&#x65F6;&#x4E13;&#x7528;
fun(Obj.name,obj.age);
</code></pre><h2 id="&#x8FD0;&#x7B97;&#x7B26;">&#x8FD0;&#x7B97;&#x7B26;</h2>
<p>1.&#x7B97;&#x672F;&#x8FD0;&#x7B97;&#x7B26;</p>
<p><code>+</code>    &#x52A0;
<code>-</code>    &#x51CF;
<code>*</code>    &#x4E58;
<code>/</code>    &#x9664;
<code>%</code>    &#x6C42;&#x4F59;
<code>i++</code>    &#x5148;&#x4F7F;&#x7528;&#x5728;&#x589E;&#x52A0;
<code>++i</code>    &#x5148;&#x589E;&#x52A0;&#x518D;&#x4F7F;&#x7528;
<code>i--</code>    &#x5148;&#x4F7F;&#x7528;&#x5728;&#x51CF;&#x5C11;
<code>--i</code>    &#x5148;&#x51CF;&#x5C11;&#x518D;&#x4F7F;&#x7528;</p>
<p>2.&#x6BD4;&#x8F83;&#x8FD0;&#x7B97;&#x7B26;</p>
<p><code>==</code>&#x7B49;&#x4E8E;
<code>&lt;</code>&#x548C;<code>&lt;=</code>&#x5C0F;&#x4E8E;&#x548C;&#x5C0F;&#x4E8E;&#x7B49;&#x4E8E;
<code>&gt;</code>&#x548C;<code>&gt;=</code>&#x5927;&#x4E8E;&#x548C;&#x5927;&#x4E8E;&#x7B49;&#x4E8E;
<code>!=</code>&#x4E0D;&#x7B49;&#x4E8E;
<code>===</code>&#x5168;&#x7B49;&#x4E8E;(&#x8FDE;&#x540C;&#x7C7B;&#x578B;&#x5224;&#x65AD;&#x662F;&#x5426;&#x5B8C;&#x5168;&#x76F8;&#x7B49;)</p>
<p>3.&#x903B;&#x8F91;&#x8FD0;&#x7B97;&#x7B26;</p>
<p>&amp;&amp;(and)    &#x4E0E;&#x8FD0;&#x7B97;(&#x53EA;&#x8981;&#x4E00;&#x4E2A;&#x4E3A;&#x5047;&#xFF0C;&#x7ED3;&#x679C;&#x90FD;&#x4E3A;false)<br>
||(or)    &#x6216;&#x8FD0;&#x7B97;(&#x53EA;&#x8981;&#x4E00;&#x4E2A;&#x4E3A;&#x771F;&#xFF0C;&#x7ED3;&#x679C;&#x90FD;&#x4E3A;true)<br>
!()    &#x975E;&#x8FD0;&#x7B97;(&#x5C31;&#x662F;&#x5426;&#x5B9A;)
^(xor)    &#x5F02;&#x6216;&#x8FD0;&#x7B97;(&#x76F8;&#x540C;&#x4E3A;0&#x4E0D;&#x540C;&#x4E3A;1)</p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/javascript/javascript.html" class="navigation navigation-prev " aria-label="Previous page: javascript"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/javascript/定时器.html" class="navigation navigation-next " aria-label="Next page: 定时器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 个人笔记 -->
</html>
